package org.goldenport.g3.sample

import org.goldenport.g3._
import org.goldenport.g3.adapters._
import org.goldenport.g3.messages._
import org.goldenport.g3.messages.filestore._

/**
 * @since   May. 22, 2010
 * @version Aug. 17, 2010
 * @author  ASAMI, Tomoharu
 **/
class FileStoreChannel extends G3Application {
  filestore('hello, "target/g3/filestore.d")

  agent('a) {
    case w: Write => Write("a.text", w.text)
  } publish("hello")

  agent('b) {
    case w: Write => Write("dir.d/b.text", w.text)
  } publish("hello")

  agent('c) {
    case w: Write => Write("dir.d/c.text", w.text)
  } publish("hello")

  start(new StringWrite("hello.txt", "Hello World")) publish("hello") agent {
    case w: Write => w.text
  } // publish("hello", "a", "b", "c")
}
